const shortcuts = [
    {
        text: "今天",
        value: () => {
            const end = new Date();
            const start = new Date();
            return [new Date(start.setHours(0, 0, 0, 0)), end.setHours(23, 59, 59, 0)];
        }
    },
    {
        text: "昨天",
        value: () => {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
            end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
            return [new Date(start.setHours(0, 0, 0, 0)), new Date(end.setHours(23, 59, 59, 0))];
        }
    },
    {
        text: "近三天",
        value: () => {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 2);
            return [new Date(start.setHours(0, 0, 0, 0)), end.setHours(23, 59, 59, 0)];
        }
    },
    {
        text: "近一月",
        value: () => {
            const end = new Date();
            const start = new Date();
            // start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
            // return [new Date(start.setHours(0,0,0,0)), end]
            start.setMonth(start.getMonth() - 1);
            return [new Date(start.setHours(0, 0, 0, 0)), end.setHours(23, 59, 59, 0)];
        }
    },
    {
        text: "近三月",
        value: () => {
            const end = new Date();
            const start = new Date();
            start.setMonth(start.getMonth() - 3);
            return [new Date(start.setHours(0, 0, 0, 0)), end.setHours(23, 59, 59, 0)];
        }
    }
];

export default shortcuts;
